/* 
 * Copyright [2018] [Alex/libo(liboware@gmail.com)]
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hyts.infodb.file.bean.file;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.hyts.infodb.bean.po.LongPO;
import com.hyts.infodb.enums.FileTypeEnum;

import lombok.Data;
import lombok.EqualsAndHashCode;

/** 
 * @author LiBo/Alex
 * @see LongPO
 * @since V1.0
 * @version V1.0 
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name="TBL_FILE")
public final class FilePO extends LongPO {

    /**  
     * <p>文件名称：可以作为保存原名称信息</p> 
     * @fieldName fileName
     * @fieldType String
     */ 
    @Column(name="FIlE_NAME",length=32)
    private String fileName;
    
    /**  
     * <p>文件目录路径</p> 
     * @fieldName filePath
     * @fieldType String
     */ 
    @Column(name="FIlE_PATH",length=64)
    private String filePath;
    
    /**
     * 是否为远程 本地或者远程OSS
     */
    @Column(name="IS_REMOTE",length=4)
    private Byte isRemote;
    
    /**  
     * <p>文件大小</p> 
     * @fieldName fileSize
     * @fieldType long
     */ 
    @Column(name="FILE_SIZE",length=32)
    private long fileSize;

    /**  
     * <p>文件类型</p> 
     * @fieldName fileType
     * @fieldType FIleTypeEnum
     */ 
    @Column(name="FILE_TYPE")
    @Enumerated(EnumType.STRING)
    private FileTypeEnum fileType;
    
    /**  
     * <p>目录ID-文件夹</p> 
     * @fieldName directoryId
     * @fieldType Long
     */ 
    @Column(name="DIRECTORY_ID")
    private Long directoryId;
    
    /**  
     * <p>是否隐藏</p> 
     * @fieldName isHidden
     * @fieldType Byte
     * 0:显示，1:隐藏
     */ 
    @Column(name="IS_HIDDEN")
    private Integer isHidden;
    
    /**  
     * <p>远程目录</p> 
     * @fieldName remotePath
     * @fieldType String
     */ 
    @Column(name="REMOTE_PATH")
    private String remotePath;

    /**
     * 文件原始名称
     */
    @Column(name="FIlE_ORGIN_NAME")
    private String fileOrginName;

    /**
     * 业务ID
     */
    @Column(name="BIZ_NO",length=32)
    private Long bizNo;
    
}
